﻿#include <QDateTime>
#include <QDebug>
#include "JZTx.h"

JZTxScopedRange::JZTxScopedRange(const QString &name)
{
    m_tag = name;
    m_time = QDateTime::currentMSecsSinceEpoch();
}

JZTxScopedRange::~JZTxScopedRange()
{
    qint64 cur = QDateTime::currentMSecsSinceEpoch();
    qDebug().noquote() << m_tag << "cost" << QString::number(cur - m_time) + "ms";
}